﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="notification_add_form.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Notification.notification_add_form" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <header class="w3-padding w3-center"><b>Thông báo mới</b></header>
    <div class="w3-padding w3-row">
        <label class="w3-col l1">Tiêu đề</label><input class="txt_notice_title tb-text w3-col" type="text" placeholder="Nhập tiêu đề thông báo" />
    </div>
    <div class="w3-padding w3-row">
        <label class="w3-col l1">Nội dung</label><textarea id="txt_add_notice_content" class="w3-col"></textarea>
    </div>
    <div class="w3-padding w3-row">
        <label class="w3-col l1">Gửi đến</label>
        <ul class="ss-author-list ss-checkbox w3-col l10">
            <%
                var get_role = new TblManagerRoleController().FetchAll();
                foreach (TblManagerRole role in get_role)
                {
                    var get_manager = new TblManagerController().FetchAll().Where(x => x.Role == role.RoleId && x.Active == true);
                    if (get_manager.ToList().Count == 0)
                        continue;
            %>
            <li>
                <a class="ss-author-list-item">
                    <input class="ss-check-room" type="checkbox" id="add-notice-<%=role.RoleId %>" /><label for="add-notice-<%=role.RoleId %>" class="ss-check"></label><i onclick="ss_open_author_list(this)" class="ss-show-member-btn fa fa-caret-right w3-large"></i><i class="ss-author-icon fa fa-users"></i><label><%=role.RoleName %></label>
                </a>
                <ul class="ss-author-list ss-author-member-list">
                    <%foreach (TblManager manager in get_manager)
                        { %>
                    <li><a>
                        <input class="ss-check-member" value="<%=manager.ManagerId %>" type="checkbox" id="add-notice-manager-<%=manager.ManagerId %>" /><label for="add-notice-manager-<%=manager.ManagerId %>" class="ss-check"></label><i class="fa fa-user"></i><span><%=manager.FullName %></span></a></li>
                    <%} %>
                </ul>
            </li>
            <%} %>
        </ul>
    </div>
    <div class="w3-padding-8 w3-center">
        <a onclick="btn_add_notice()" class="w3-btn w3-teal"><i class="fa fa-send-o"></i>&nbsp;Gửi</a>
    </div>
</body>
</html>
